package cn.pink.common.entity.game.group;

import cn.pink.common.constant.DBConst;
import cn.pink.core.entity.AbstractEntity;
import cn.pink.core.gen.entity.Entity;

import java.util.Set;

/**
 * 玩家群成员
 */
@Entity(tableKey = DBConst.DB_KEY_HUMAN_GROUP)
public class EntityHumanGroup extends AbstractEntity {
    /** 群id */
    private long groupId;

    /** 职位 */
    private int position;

    /** 申请的玩家群列表 */
    private Set<String> apply;

    /** 历史加入过的玩家群 */
    private Set<Long> history;

    /** 总贡献 */
    private long offer;

    public EntityHumanGroup(String humanId) {
        init(humanId);
    }

    public long getGroupId() {
        return groupId;
    }

    public void setGroupId(long groupId) {
        this.groupId = groupId;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    public Set<String> getApply() {
        return apply;
    }

    public void setApply(Set<String> apply) {
        this.apply = apply;
    }

    public Set<Long> getHistory() {
        return history;
    }

    public void setHistory(Set<Long> history) {
        this.history = history;
    }

    public long getOffer() {
        return offer;
    }

    public void setOffer(long offer) {
        this.offer = offer;
    }

    @Override
    public void makeKey() {
        keyPrefix = DBConst.DB_KEY_HUMAN_GROUP;
    }
}
